import request from "@/config/request.js";
import { setObjToString } from "@/utils/common.js";
export default {
	// 我的专家列表
	getExpList(data) {
		return request({
			url: "/user/expList",
			method: "POST",
			data,
		});
	},
	// 获取专家详情
	getExpertInfo(data) {
		return request({
			url: "/user/expertInfo",
			method: "POST",
			data,
		});
	},
	// 呼叫专家
	cellExp(data) {
		return request({
			url: "/user/playCall",
			method: "POST",
			data,
		});
	},
	// 搜索专家
	searchexpList(data) {
		return request({
			url: "/user/searchexpList",
			method: "POST",
			data,
		});
	},
	// 判断是否为好友
	isFriend(data) {
		return request({
			url: "/user/isFriend",
			method: "POST",
			data,
		});
	},
	// 申请好友
	addExp(data) {
		return request({
			url: "/user/addExp",
			method: "POST",
			data,
		});
	},
	// 签约记录
	addList(data) {
		return request({
			url: "/user/userApList",
			method: "POST",
			data,
		});
	},
  // 签约团队详情
  teamDetail(teamId) {
    return request({
			url: `/expert/team/detail?teamId=${teamId}`,
			method: "GET",
		});
  },
  // 用户签约团队
  userSignTeam(data) {
    return request({
			url: "/expert/team/user/sign",
			method: "POST",
      header: {
        'content-type': 'application/json;charset=utf-8'
      },
			data,
		});
  },
  // 团队成员列表
  teamExpList(query) {
    return request({
			url: `/expert/team/role/list` + setObjToString(query),
			method: "GET",
		});
  },
  // 签约团队申请记录
  getTeamAddList(query) {
    return request({
			url: `/expert/team/user/aplist` + setObjToString(query),
			method: "GET",
		});
  },
  // 签约团队列表
  getTeamList(query) {
    return request({
			url: `/expert/team/list` + setObjToString(query),
			method: "GET",
		});
  },
 
  
	// 获取专家排班
	schedule(data) {
		return request({
			url: "/plan/query",
			method: "POST",
			data,
		});
	},
	// 专家扫码绑定openID
	bandExpOpenId(data) {
		return request({
			url: "/exp/openId",
			method: "POST",
			data,
		});
	},

	// 咨询订单列表
	orderList(data) {
		return request({
			url: "/user/orderList",
			method: "POST",
			data,
		});
	},
	// 咨询订单详情
	orderInfo(data) {
		return request({
			url: "/user/orderInfo",
			method: "POST",
			data,
		});
	},
	// 取消订单
	roomcancel(data) {
		return request({
			url: "/user/roomcancel",
			method: "POST",
			data,
		});
	},

	// 确定订单
	confirmOrder(data) {
		return request({
			url: "/user/confirmOrder",
			method: "POST",
			data,
		});
	},
	// 确认订单支付
	callConfirmOrder(data) {
		return request({
			url: "/user/deduction",
			method: "POST",
			data,
		});
	},

	// 获取专家排班
	getPlanList(data) {
		return request({
			url: "/plan/list",
			method: "POST",
			data,
		});
	},
	// 创建预约订单
	createOrder(data) {
		return request({
			url: "/user/createOrder",
			method: "POST",
			data,
		});
	},

	// 获取订单详情
	getOrderDetail(query) {
		return request({
			url: "/user/order/detail" + setObjToString(query),
			method: "GET",
		});
	},

	// 预约订单-签到
	orderAutograph(data) {
		return request({
			url: "/user/autograph",
			method: "POST",
			data,
		});
	},

	// 检验检查报告列表
	getReportList(data) {
		return request({
			url: "/home/check/report/get",
			method: "GET",
			data,
		});
	},
	// 确认收货
	updateMailing(data) {
		return request({
			url: "/order/mailing/update",
			method: "POST",
      header: {
        'content-type': 'application/json;charset=utf-8'
      },
			data,
		});
	},
  // 通过邀请码获取房间信息
  getRoomInfo(data) {
    return request({
			url: "/room/get",
			method: "POST",
			data,
		});
  },
  // 加入房间
  userAddRoom(data) {
    return request({
			url: "/user/addRoomUser",
			method: "POST",
			data,
		});
  }
};
